<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
?>

<div class="visit-our-shop-widget">
    <a href="#"><img src="http://specchi.com.pe/wp35/wp-content/uploads/2014/06/visit-shop-footer.png"/></a>
</div>

<div class="home-links-widget">
    <a href="#" class="link"><img src="http://localhost/specchi2/wp-content/uploads/2014/06/specchi-salon.png" alt="Salon" /></a>
    <a href="#" class="link"><img src="http://localhost/specchi2/wp-content/uploads/2014/06/specchi-spa.png" alt="Spa" /></a>
    <a href="#" class="link"><img src="http://localhost/specchi2/wp-content/uploads/2014/06/specchi-novias.png" alt="Novias" /></a>
    <a href="#" class="link"><img src="http://localhost/specchi2/wp-content/uploads/2014/06/specchi-store.png" alt="Store" /></a>
</div>

<div class="advertise-widget">
    <ul>
        <li><a href="#"><img src="http://localhost/specchi2/wp-content/uploads/2014/05/ad1.png" alt="Kerastase"/></a></li>
        <li><a href="#"><img src="http://localhost/specchi2/wp-content/uploads/2014/05/ad2.png" alt="Moroccanoil"/></a></li>
        <li><a href="#"><img src="http://localhost/specchi2/wp-content/uploads/2014/05/ad3.png" alt="Loreal"/></a></li>
        <li><a href="#"><img src="http://localhost/specchi2/wp-content/uploads/2014/05/ad4.png" alt="Kerastase"/></a></li>
    </ul>
</div>

<div class="last-posts"> 
	<?php 
		$my_query = new WP_Query( "post_type=post&paged=1&posts_per_page=5&order=desc&orderby=date" );
		if ( $my_query->have_posts() ) { 
			while ( $my_query->have_posts() ) { 
				$my_query->the_post();
	?>
				<div class="single-post"> 
					<div class="image"><?php the_post_thumbnail('footer-thumbnail'); ?></div>
					<div class="content">
						<div class="title"><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></div>
						<div class="info"><?php the_time("d M, Y"); ?></div>
					</div>
				</div>
	<?php   }
		}else {
			echo "<div>no posts</div>";
		}
		wp_reset_postdata();
	?>
</div>

<div class="blog_categories">
    <ul>
        <?php 
            $categories = get_categories('child_of=19'); 
            foreach ($categories as $category) {
        ?>
            <li><a href="<?php bloginfo('url'); ?>/category/blog/<?php echo $category->slug; ?>"><?php echo $category->cat_name; ?></a></li> 
        <?php } ?>
    </ul>
</div>

<div class="product_categories">
    <ul>
        <?php 
            $categories = get_categories('child_of=26&taxonomy=product_cat'); 
            foreach ($categories as $category) {
        ?>
            <li><a href="<?php bloginfo('url'); ?>/categoria-producto/tipo/<?php echo $category->slug; ?>"><?php echo $category->cat_name; ?></a></li> 
        <?php } ?>
    </ul>
</div>